package com.sooncode.project.focusservice.service;

import com.sooncode.project.core.finder.Page;
import com.sooncode.project.core.model.DomainException;
import com.sooncode.project.focusservice._.base.BaseService;
import com.sooncode.project.focusservice.model.Sensory;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class SensoryService extends BaseService<Sensory> {
    public Page<Sensory> getDevicePageList(int pageSize, int pageIndex, Map map) {
        if(!map.containsKey("orgId")|| StringUtils.isEmpty(map.get("orgId").toString()))
            throw new DomainException("orgId不能为空");
        return super.getPageList(pageSize,pageIndex,map);
    }
}
